package hvz.app;

import com.dm.zbar.android.scanner.ZBarScannerActivity;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;



public class ReportKillActivity extends Activity {
	
	private Button manualCodeBtn;
	private Button qrScanner;
	private Button backBtn;
	
	static final int ZBAR_SCANNER_REQUEST = 0;
	
	public void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.report_kill_screen_activity);
		
		manualCodeBtn = (Button)findViewById(R.id.codeButton);
		qrScanner = (Button)findViewById(R.id.qrScan);
		backBtn = (Button)findViewById(R.id.cancelReportKillButton);
		
		manualCodeBtn.setOnClickListener(new OnClickListener(){
			@Override
			public void onClick(View v) {
				Intent nextScreen = new Intent(getApplicationContext(), EnterPlayerCodeActivity.class);
				startActivity(nextScreen);
				finish();
				
			}
		});
		
		qrScanner.setOnClickListener(new OnClickListener(){
			@Override
			public void onClick(View v) {
				Intent nextScreen = new Intent(getApplicationContext(), ZBarScannerActivity.class);
				startActivityForResult(nextScreen, ZBAR_SCANNER_REQUEST);
			}
		});
		
		backBtn.setOnClickListener(new OnClickListener(){
			@Override
			public void onClick(View v) {
				Intent nextScreen = new Intent(getApplicationContext(), ZombieActivity.class);
				startActivity(nextScreen);
				finish();
			}
		});
	}

}
